package com.zb.frame.base.utils.encrypt;

import org.apache.shiro.crypto.hash.SimpleHash;

public class SimpleHashUtil {

    private static String baseSalt = "salt";
    private static int baseHashIterations = 2;
    private static String baseType = "MD5";

    public static String encode(String str) {
        return new SimpleHash("MD5", str, baseSalt, baseHashIterations).toString();
    }

    public static String encode(String type, String str) {
        return new SimpleHash(type, str, baseSalt, baseHashIterations).toString();
    }

    public static void main(String[] args) {
        System.out.println(encode("111111"));
    }
}
